package com.nassir.chatroom.util;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class FrameUtils {

	public static void setCenter(JFrame jf) {
		Toolkit kit = Toolkit.getDefaultToolkit();
		Dimension screenSize = kit.getScreenSize();
		int width = screenSize.width;
		int height = screenSize.height;
		final int WIDTH = 344;
		final int HEIGHT = 185;
		// setSize(WIDTH,HEIGHT);
		int x = (width - WIDTH) / 2;
		int y = (height - HEIGHT) / 2;
		jf.setLocation(x, y);
	}
}
